From 7687393583dbe6b01f3403a486414e32f2e54107 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 3 Jan 2018 13:41:20 -0500 Subject: [PATCH] font chooser: Don't set hardcoded default features We should rely on harfbuzz to select the right defaults. --- gtk/gtkfontchooserwidget.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gtk/gtkfontchooserwidget.c b/gtk/gtkfontchooserwidget.c index c11fc9f9f0..ba7c19d661 100644 --- a/gtk/gtkfontchooserwidget.c +++ b/gtk/gtkfontchooserwidget.c @@ -2087,7 +2087,7 @@ update_font_features (GtkFontChooserWidget *fontchooser) GString *s; GList *l; - s = g_string_new ("\"kern\" 1, \"curs\" 1, \"lfbd\" 1, \"rfbd\" 1, \"mark\" 1, \"mkmk\" 1, \"mset\" 1, \"ccmp\" 1, \"rlig\" 1, \"rclt\" 1, \"rvrn\" 1"); + s = g_string_new (""); for (l = priv->feature_items; l; l = l->next) { @@ -2101,7 +2101,9 @@ update_font_features (GtkFontChooserWidget *fontchooser) if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (item->feat)) && strcmp (item->name, "xxxx") != 0) { - g_string_append (s, ", \""); + if (s->len > 0) + g_string_append (s, ", "); + g_string_append (s, "\""); g_string_append (s, item->name); g_string_append (s, "\" 1"); } @@ -2111,6 +2113,8 @@ update_font_features (GtkFontChooserWidget *fontchooser) if (gtk_check_button_get_inconsistent (GTK_CHECK_BUTTON (item->feat))) continue; + if (s->len > 0) + g_string_append (s, ", "); g_string_append (s, ", \""); g_string_append (s, item->name); if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (item->feat))) -- 2.30.2